package com.sgmw.sales.tool.kong.sign.generator;

import java.util.ArrayList;
import java.util.List;

import com.sgmw.sales.tool.kong.sign.AbstractAuthroizationGenerator;
import com.sgmw.sales.tool.kong.sign.headers.RequestHeader;
import com.sgmw.sales.tool.kong.sign.headers.SignHeaderDate;
import com.sgmw.sales.tool.kong.sign.request.HttpRequest;

/**
 * 只对请求时间戳做签名
 * @author hujunwei
 * @d2019年3月14日
 */
public class SimpleAuthroizationGenerator extends AbstractAuthroizationGenerator {
	public SimpleAuthroizationGenerator(String username, String secret, HttpRequest request) {
		super(username, secret);
	}

	@Override
	protected List<RequestHeader> decideSignHeaders() {
		List<RequestHeader> signHeaders = new ArrayList<>();
		SignHeaderDate date = new SignHeaderDate();
		signHeaders.add(date);
		return signHeaders;
	}
}
